package com.wis.util;

import android.content.Context;

/**
 * SharePreference管理工具
 * by：lif at:2017-11-17 13:05:28
 */
public class MyPreferences {


    private static final String THRESHOLD = "threshold";


    public static boolean setThreshold(Context context, int value) {
        return MyPreferencesAccessor.saveData(context, THRESHOLD, value);
    }

    public static int getThreshold(Context context) {
        return MyPreferencesAccessor.getIntData(context, THRESHOLD);
    }

    // 清除部分SharedPreference
    public static void clean(Context context) {
        MyPreferencesAccessor.deleteKeys(context, THRESHOLD);
    }

}
